/**
 * 
 */
package com.bstek.code.view.singletable;

import java.util.Collection;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;

import com.bstek.code.model.ColumnInfo;
import com.bstek.code.service.querycolumn.QueryColumnService;
import com.bstek.dorado.annotation.DataProvider;

/**
 * @description 单表配置
 * @author zhangkun
 * @date 2020年6月5日
 *
 */
@Controller(SingleTableController.BEAN_ID)
public class SingleTableController {
	public static final String BEAN_ID = "SINGLETABLECONTROLLER";
	
	@Resource(name = QueryColumnService.BEAN_ID)
	private QueryColumnService queryColumnService;
	
	/**
	 * 
	 * @description 查询列
	 * @author zhangkun
	 * @date 2020年6月5日
	 * @param tableName
	 * @return
	 * @throws Exception
	 */
	@DataProvider
	public Collection<ColumnInfo> queryColums(String tableName) throws Exception{
		return queryColumnService.queryColumns(tableName);
	}

}
